package org.raymond.iworks.study.basic.designpattern.mediator;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public class Client {
    public static void main(String[] args) {
        Mediator mediator = new ConcreteMediator();
        Alarm alarm = new Alarm(mediator, "alarm");
        CoffeeMachine coffeeMachine = new CoffeeMachine(mediator, "coffeeMachine");
        TV tv = new TV(mediator, "TV");
        Curtains curtains = new Curtains(mediator, "curtains");

        alarm.sendMessage(0);
        coffeeMachine.finishCoffee();
        alarm.sendMessage(1);
    }
}
